<template>
  <div>{{ num }}</div>
  <button type="" @click="add">+</button>
</template>
<script setup>
import { ref } from "vue";
const num = ref(0);
const add = () => {
  return num.value = num.value + 1
};
</script>

<style scoped></style>
